package com.leetcode.concurrency.singleton;

/**
 * @author Dennis Li
 * @date 2020/8/11 19:58
 */
public class EnumSingleton {

    private enum Enum {
        INSTANCE;

        private EnumSingleton enumSingleton;

        Enum() {
            enumSingleton = new EnumSingleton();
        }
    }

    public static EnumSingleton getInstance() {
        return Enum.INSTANCE.enumSingleton;
    }

}
